package maurice;
import maurice.controller.Direction;

public class Movement {
	private Direction leftArm;
	private Direction rightArm;
	
	public Movement(Direction leftArm, Direction rightArm){
		this.leftArm = leftArm;
		this.rightArm = rightArm;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((leftArm == null) ? 0 : leftArm.hashCode());
		result = prime * result
				+ ((rightArm == null) ? 0 : rightArm.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Movement other = (Movement) obj;
		if (leftArm == null) {
			if (other.leftArm != null)
				return false;
		} else if (!leftArm.equals(other.leftArm))
			return false;
		if (rightArm == null) {
			if (other.rightArm != null)
				return false;
		} else if (!rightArm.equals(other.rightArm))
			return false;
		return true;
	}
	
	public void setLeftArmDirection(Direction dir){
		this.leftArm = dir;
	}
	
	public void setRightArmDirection(Direction dir){
		this.rightArm = dir;
	}
	
	public Direction getLeftArmDirection(){
		return this.leftArm;
	}
	
	public Direction getRightArmDirection(){
		return this.rightArm;
	}
}
